/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.shailan.util.fem.model;

import com.shailan.util.fem.Model;


/**
 *
 * @author Bahadir SAYLAN
 */
public class Model3DFrame extends Model{

    float node[][]=new float[10000][3];
    int frame[][]=new int[5000][3];
    private int nodesNum=0;
    private int framesNum = 0;

    public void addNode(int id,float x,float y,float z){
        
        node[id][0]=x;
        node[id][1]=y;
        node[id][2]=z;
        setNodesNum(getNodesNum() + 1);
    }

    public void addFrame(int id,int nI,int nJ){
        frame[id][0]=nI;
        frame[id][1]=nJ;
        setFramesNum(getFramesNum() + 1);
    }

    public float[][] getNodes(){return node;}

    public float getNodeX(int id){ return node[id][0]; }
    public float getNodeY(int id){ return node[id][1]; }
    public float getNodeZ(int id){ return node[id][2]; }

    public int getFrameNodeI(int id) { return frame[id][0];}
    public int getFrameNodeJ(int id) { return frame[id][1];}
    public int getNodesNum(){ return nodesNum;}
    public int getFramesNum(){ return framesNum;}

    /**
     * @param nodesNum the nodesNum to set
     */
    public void setNodesNum(int nodesNum) {
        this.nodesNum = nodesNum;
    }

    /**
     * @param framesNum the framesNum to set
     */
    public void setFramesNum(int framesNum) {
        this.framesNum = framesNum;
    }

}
